﻿using Flaschengeist.Processes;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Flaschengeist.Tests
{
     [TestClass]
    public class CalculateTotalTimeTest
    {
        [TestMethod]
        public void Gesamt_Zeit_wird_korrekt_berechnet()
        {
            var totalTime = 0;
            var calcTotalTime = new CalculateTotalTime();
            calcTotalTime.Completed += (result) => totalTime = result;
            calcTotalTime.Process(new string[] { "c2", "h", "c2", "h" });
            Assert.AreEqual(60, totalTime);
            calcTotalTime.Process(new string[] { });
            Assert.AreEqual(0, totalTime);
        }
    }
}
